package com.restkeeper.config;

import com.github.wxpay.sdk.WXPayConfig;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.io.InputStream;

@Component
@Data
public class WXConfig implements WXPayConfig {

    @Value("${wxpay.appId}")
    private String appId;
    @Value("${wxpay.appSecret}")
    private String appSecret;
    @Value("${wxpay.mchId}")
    private String mchId;
    @Value("${wxpay.notifyUrl}")
    private String notifyUrl;
    @Value("${wxpay.privateKeyPath}")
    private String privateKeyPath;
    @Value("${wxpay.merchantSerialNumber}")
    private String merchantSerialNumber;
    @Value("${wxpay.apiV3Key}")
    private String apiV3Key;
    @Value("${wxpay.apiV2Key}")
    private String apiV2Key;
    @Value("${wxpay.publicKeyId}")
    private String publicKeyId;
    @Value("${wxpay.publicKeyFromPath}")
    private String publicKeyFromPath;
    @Value("${wxpay.refund_notify_url}")
    private String refund_notify;

    /**微信发货接口token接口*/
    @Value("${wxpay.cgi_bin_token_url}")
    private String cgi_bin_token_url;
    /**微信发货接口接口*/
    @Value("${wxpay.upload_shipping_info_url}")
    private String upload_shipping_info_url;

    @Override
    public String getAppID() {
        return this.appId;
    }

    @Override
    public String getMchID() {
        return this.mchId;
    }

    @Override
    public String getKey() {
        return "";
    }

    @Override
    public InputStream getCertStream() {
        return null;
    }

    @Override
    public int getHttpConnectTimeoutMs() {
        return 0;
    }

    @Override
    public int getHttpReadTimeoutMs() {
        return 0;
    }
}